<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $cfg_soft_lang; ?>" />
<title><?php echo $title; ?> - 下载地址列表_<?php echo $cfg_webname;?></title>
<link rel="shortcut icon" href="<?php echo $cfg_cmsurl; ?>/favicon.ico" />
<link href="<?php echo $cfg_skin; ?>/css/common.css" rel="stylesheet" type="text/css" media="screen" />
<link href="<?php echo $cfg_skin; ?>/css/index.css" rel="stylesheet" type="text/css" media="screen" />
<script type="text/javascript" src="<?php echo $cfg_skin; ?>/js/jquery-1.7.1.js"></script>
<script type="text/javascript" src="<?php echo $cfg_skin; ?>/js/main.js"></script>
<script>
    var _hmt = _hmt || [];
    (function() {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?08dbda8bbd5d3bfb2d866a7b8e75b523";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
    })();
</script>
</head>
<style>
a, a img, input, textarea{padding: 0;border: none;color: #424242;text-decoration: none;font-family: 微软雅黑, 宋体, Verdana, Geneva, sans-serif;font-size: 12px;}
</style>
<body>
	<!-- head -->
<?php pasterTempletDiy("head.htm"); ?> 
    <!-- head End -->
<div class="dows-list-box">
  <?php
  $sql = "SELECT aid,money FROM `#@__member_operation` WHERE buyid='ARCHIVE".$aid."' AND mid='".$cfg_ml->M_ID."'";
  $row = $dsql->GetOne($sql);
  
  if($cfg_ml->M_ID==0){?>
  <div class="dow-msg-err">
  	<h1>对不起，出错了</h1>
    <p>您还没有登录，请先<a href="<?php echo $cfg_memberurl;?>/login.php">登录</a></p>
  </div>
  <?php }else if($dow['needmoney']==0){?>
  <div class="dow-msg">
  	<h1>该素材为免费资源，请下载</h1>
    <p style="margin-left:70px">特权：立体派模型网交流①群:828665796 ②群:805598995</p>
  </div>
  <?php }else if($cfg_ml->isAdmin==1){?>
  <div class="dow-msg">
  	<h1>您是管理员，下载不会扣费</h1>
    <p>特权：您是管理员，享免费特权，请下载</p>
  </div>
  <?php }else if(is_array($row)){?>
  <div class="dow-msg" style="background-position:236px -100px;">
  	<h1>您下载过该素材，多次下载不再扣费</h1>
    <p>特权：您下载过该素材，多次下载不再扣费，请下载</p>
  </div>
  <?php }else if($cfg_ml->M_Money >= $dow['needmoney']){?>
  <div class="dow-msg">
  	<h1>恭喜您，支付成功！请下载</h1>
    <p>特权：金币扣取成功后，下次下载不再扣费</p>
  </div>
  <?php }else{?>
  <div class="dow-msg-err">
  	<h1>对不起，出错了</h1>
    <p>您的金币不足，请先<a href="<?php echo $cfg_memberurl;?>/buy.php">充值</a></p>
  </div>
  <?php }?>
  <div class="arc-cont">
  	<div class="float_l">
   	  <p><a href='<?php echo $arcurl; ?>' title='<?php echo $title; ?>'><img src="<?php echo qn_pic_path($litpic);?>" /></a></p>
      <p class="arc-titles"><a href='<?php echo $arcurl; ?>' title='<?php echo $title; ?>'><?php echo $title; ?></a></p>
    </div>
    <?php 
    $sql = "SELECT aid,money FROM `#@__member_operation` WHERE buyid='ARCHIVE".$aid."' AND mid='".$cfg_ml->M_ID."'";
    $row = $dsql->GetOne($sql);
    
    if($cfg_ml->M_ID == 0){?>
    <div class="dow-list-likes">
      <h1>错误提示：</h1>
      <ul class="err">
      	<p>您还没有登录，不能下载，请先<a href="<?php echo $cfg_memberurl;?>/login.php">登录</a></p>
      </ul>
    </div>
    <?php }else if($cfg_ml->M_Money >= $dow['needmoney'] || is_array($row) || ($cfg_ml->isAdmin==1)){?>
    <div class="dow-list-likes">
      <h1>下载地址：</h1>
      <ul>
      	<?php if($dow['pan_baidu']!=''){?>
        <li class="pan-baidu"><a href="<?php echo 'download.php?open=2&id='.$aid.'&uhash='.substr(md5(preg_replace("/\s/","",$dow['pan_baidu'])), 0, 24)?>" target="_blank">百度云盘</a> <span>提取密码：<i><?php echo $dow['pan_baidu_mima']?></i></span></li>
        <?php } ?>
		<?php if($dow['softurl1']!=''){?>
        <li class="pan-baidu"><a href="<?php echo 'download.php?open=2&id='.$aid.'&uhash='.substr(md5(preg_replace("/\s/","",$dow['softurl1'])), 0, 24)?>" target="_blank">本地下载</a></li>
        <?php } ?>
      </ul>
      <!-- <h1 class="dows-pwd-title"></h1> -->
    </div>
    <?php }else if(!is_array($row) && $cfg_ml->M_Money < $dow['needmoney']){?>
    <div class="dow-list-likes">
      <h1>错误提示：</h1>
      <ul class="err">
      	<p>您的金币不足，请先<a href="<?php echo $cfg_memberurl;?>/buy.php">充值</a></p>
      </ul>
    </div>
    <?php }?>
  </div>
</div>
<div class="back">
	<a href="<?php echo $cfg_cmsurl;?>/" class="home">返回首页</a>
    <a href="<?php echo $arcurl;?>" class="arcurl">返回上一页</a>
</div>

</body>
</html>
